package com.hakim.wfb.customer.util;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by walkman on 2017/7/15.
 */
public class MiscUtils {

    /**
     * @param strCode
     * @return
     */
    public static String getParentCode(String strCode) {

        if (StringUtils.isBlank(strCode))
            return strCode;

        if (strCode.lastIndexOf(".") < 0) {
            return strCode;
        }

        return strCode.substring(0, strCode.lastIndexOf("."));
    }

}
